<!--用户登录页面-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-1.12.4.min.js"></script>
    <script src="bootstrap/js/bootstrap.js"></script>
    <link type="text/css" href="bootstrap/css/bootstrap.css" rel="stylesheet">
    <script language="JavaScript">
        $(function () {
           $('.submit_form').click(function () {
               $.ajax({
                   type:"POST",
                   dataType:"json",
                   contentType : "application/x-www-form-urlencoded; charset=utf-8",
                   url:"http://127.0.0.1:9000/api/v1/user/login/",
                   data:$('#form_login').serialize(),
                   success:function (result) {
                       if(result.status === 200){
                           alert("登录成功");
                           window.location.href = "index.html"
                       }
                   }

               })
           })
        });
    </script>
</head>
<body>
<div class="container">
    <div class="col-lg-6">
    <form class="form-horizontal" method="post" action="#" id="form_login">
         <div class="form-group" style="margin-bottom: 40px">
            <div class="col-sm-offset-4">
                <h1 class="">淘票票登录</h1>
            </div>
         </div>

         <div class="form-group">
             <div class="col-sm-10 col-sm-offset-2 clearfix">
                  <div class="pull-right"><a>手机验证码登录</a></div>
             </div>
         </div>

        <div class="form-group">
            <label for="inputCount" class="col-sm-2 control-label">账号</label>
            <div class="col-sm-10 ">
              <input type="text" class="form-control" name="account" value="" id="inputCount" placeholder="邮箱/手机号/用户名">
            </div>
        </div>

         <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
            <div class="col-sm-10">
              <input type="password" class="form-control" name="password" id="inputPassword" placeholder="Password">
            </div>
         </div>

        <!--<div class="form-group">-->
            <!--<label for="vertify" class="col-sm-2 control-label">验证码</label>-->
            <!--<div class="col-sm-10">-->
                <!--<img src="{{ img_url }}" id="vertify_img">-->
                <!--<input type="text" name="vertify_code">-->
                <!--<input type="hidden" id="key" name="key" value="{{ key }}">-->
            <!--</div>-->
         <!--</div>-->

      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <div class="checkbox">
            <label>
              <input type="checkbox" name="remember" checked > 下次自动登录
            </label>
              <label>
                  <span>|<a>忘记密码了</a></span>
              </label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="button" class="btn btn-success btn-lg submit_form">登录</button>
        </div>
      </div>

         <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <table class="table">
              <tr>
                  <td>
                      <span>第三方登录:</span>
                      <span><a href="#"><img src="imgs/qq.png"></a></span>
                      <span><a href="#"><img src="imgs/wechat.png"></a></span>
                  </td>
              </tr>
          </table>
        </div>
      </div>
</form>
</div>

    <div class="col-lg-4">
        <div style="margin-top: 140px;margin-left: 100px">
            <div><span>&raquo;还没有淘票票网账号?</span><a href="user_register.html">立即注册</a></div>
            <div>&raquo;<a href="index.html">返回首页</a></div>
        </div>

    </div>
</div>
</body>
</html>